New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luminous: rbd: librbd: object map improperly flagged as invalidated #24415
Conversation
The HEAD and snapshots have potentially different flag states since object maps get invalidated per revision. Signed-off-by: Jason Dillaman <dillaman@redhat.com> (cherry picked from commit 8620827) Conflicts: src/librbd/ObjectMap.cc: trivial resolution src/librbd/operation/SnapshotRemoveRequest.cc: trivial resolution src/test/librbd/test_DeepCopy.cc: DNE src/test/librbd/test_Migration.cc: DNE
Signed-off-by: Jason Dillaman <dillaman@redhat.com> (cherry picked from commit 5877018) Conflicts: src/librbd/object_map/SnapshotRemoveRequest.cc: trivial resolution src/librbd/object_map/SnapshotRemoveRequest.h: trivial resolution
int r = m_image_ctx.get_flags(m_snap_id, &flags); | ||
assert(r == 0); | ||
int r = m_image_ctx.get_flags(m_snap_id, &m_flags); | ||
ceph_assert(r == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ceph_assert or assert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trociny updated
…istent snapshot If duplicate snapshot remove requests are received by the lock owner from a peer client, the first request will remove the object map. If the second request arrives while the first is in-progress, it will again attempt to remove the object map but fail to load it since it's already been deleted. This incorrectly results in the next object map being flagged as invalid. Fixes: http://tracker.ceph.com/issues/24516 Signed-off-by: Jason Dillaman <dillaman@redhat.com> (cherry picked from commit 0a31c55) Conflicts: src/librbd/object_map/SnapshotRemoveRequest.cc: trivial resolution
The copyup state machine needs to iterate over all object maps to update the existence for the object. If an snapshot is being removed concurrently, it's possible to invalidate the object map for the image. Fixes: http://tracker.ceph.com/issues/24516 Signed-off-by: Jason Dillaman <dillaman@redhat.com> (cherry picked from commit 5a1cb46) Conflicts: src/librbd/ObjectMap.cc: trivial resolution src/librbd/ObjectMap.h: trivial resolution src/librbd/deep_copy/ObjectCopyRequest.cc: moved to rbd-mirror image sync src/librbd/io/CopyupRequest.cc: trivial resolution src/test/librbd/deep_copy/test_mock_ObjectCopyRequest.cc: moved to rbd-mirror image sync src/test/librbd/test_mock_ObjectMap.cc: trivial resolution
The IO was being unblocked before object map was created, allowing a potential copyup request to fail to update a still-to-be-created object map. Fixes: http://tracker.ceph.com/issues/24516 Signed-off-by: Jason Dillaman <dillaman@redhat.com> (cherry picked from commit 1e87440) Conflicts: src/librbd/object_map/SnapshotCreateRequest.cc: trivial resolution src/librbd/operation/SnapshotCreateRequest.cc: trivial resolution
61412f9
to
8975ba0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
http://tracker.ceph.com/issues/36224